/*
 * Copyright (C) Michael Opitz
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301,
 * USA
 */
#ifndef PARSER_H
#define PARSER_H

#include "dom.h"
#include <iksemel.h>
#include <boost/shared_ptr.hpp>
#include <string>

using namespace std;

/**
 * \brief This namespace contains all model-classes.
 * \author Michael Opitz
 */
namespace model {
	/**
	 * This class wrappes the iksemel-struct "iksparser", which 
	 * holds all xml-parsing-informations
	 * \author Michael Opitz <opitz.michael@gmail.com>
	 * \version 0.1
	 */
	template <class parser_pol>
	class parser : public parser_pol {
	public:
		/**
		 * Does basically nothing.
		 */
		parser();
		/**
		 * Does basically nothing.
		 */
		~parser();

		/**
		 * parses the passed string.
		 * \param str is the string, which should be parsed.
		 * \return true if it was successfull.
		 */
		bool parse(const string &str);
	private:
		/**
		 * Stores the underlying iksparser*-object which is wrapped.
		 */
		iksparser *iks_parser;
	};
}
#include "parser.tpl"
#endif
